package com.vzhv.myself.mapper;

import com.vzhv.myself.vo.Juanzhou;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface JuanzhouMapper {
    @Insert("insert into juanzhou values(null,#{content},#{author},#{url},#{created},#{userId})")
    void insert(Juanzhou juanzhou);

    @Select("select * from juanzhou order by created desc")
    List<Juanzhou> select();

    @Select("select * from juanzhou where id=#{id}")
    Juanzhou selectById(int id);
}
